package com.xhsj.user.sms.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhsj.user.sms.purchase.entity.TbPurchaseSubtaskPaymentApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 采购订单-支付申请表 Mapper 接口
 * </p>
 *
 * @author suxiaolin
 * @since 2020-04-13
 */
@Mapper
public interface TbPurchaseSubtaskPaymentApplyMapper extends BaseMapper<TbPurchaseSubtaskPaymentApply> {

    //付款申请相关的数据
    List<Map<String, Object>> getPayMentApplyList(@Param("dataId") String dataId,
                                                  @Param("batchList") List<String> batchList);

    Map<String,Object> getMoneyByBatch(@Param("batch") int batch, @Param("id") String id);

    int delById(@Param("id") String id);

    //通过业务id删除支付申请
    int delByDataId(@Param("dataId") String dataId);

    //获取最新合同支付记录
    TbPurchaseSubtaskPaymentApply getNewPayMentApply(@Param("dataId") String dataId);
}
